feat: platform hardening v4 — Temporal workflows, Kafka consumers, polyglot services, PWA/mobile parity#30
Merged
Conversation
…PWA/mobile parity - Add Chainalysis KYT fail-closed guard in production - Add Go services: continuous KYC, DLQ processor, smart routing - Add Python services: adverse media screening, predictive routing - Add Rust service: bridge executor with LI.FI SDK - Add TypeScript platformHardeningV3 module (26 functions) - Add PWA NativeIntegrations (deep links, Apple/Google Pay, web vitals) - Add React Native NativePayScreen (deep links, pay, camera, widgets) - Add Flutter native_pay_screen (deep links, pay, camera, optimization) - Add comprehensive test suite (40 assertions) Co-Authored-By: Patrick Munis <pmunis@gmail.com>
…lyglot services, PWA/mobile parity Implements all ~50 platform audit recommendations: KYC/KYB/Liveness: - Continuous KYC via Temporal cron (15-min re-screening) - Multi-provider compliance screening (Refinitiv, ComplyAdvantage, Chainalysis) - Synthetic identity detection (Python GNN service) - Document fraud ML model (Python FastAPI + ONNX) - Fail-closed sanctions screening Stablecoins: - Live FX oracle integration (CoinGecko API with fail-closed prod guard) - DCA scheduler via Temporal cron - Auto-convert Kafka consumer on PAYMENT_COMPLETED - Yield auto-compound daily workflow - Settlement netting hourly workflow Flow of Funds: - Multi-rail failover (Go service: SWIFT→RTGS→stablecoin→mobile money) - Kafka consumers for auto-convert and DLQ processing - Fluvio SmartModule registration (sanctions, PEP, threshold, adverse media) - OpenSearch ISM lifecycle policies - Lakehouse bronze/silver/gold ETL pipelines - APISix route sync - TigerBeetle reconciliation - Rust audit chain service (tamper-proof hash chain) UI/UX (PWA + Mobile Parity): - Deep links configuration (Universal Links + App Links) - Apple Pay / Google Pay native payments - Optimized image component (Cloudinary/imgix CDN) - Skeleton loading components - Error tracking (Sentry integration) - A/B testing (GrowthBook SDK) - Service worker v4 (stale-while-revalidate, LRU cache, background sync) Middleware: Temporal, Kafka, Fluvio, OpenSearch, Lakehouse, APISix, TigerBeetle Languages: TypeScript, Go, Rust, Python 0 TypeScript errors, 0 new test regressions vs base branch Co-Authored-By: Patrick Munis <pmunis@gmail.com>
Contributor
Author
Original prompt from Patrick
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…, fail-closed guards, EDD risk scoring Co-Authored-By: Patrick Munis <pmunis@gmail.com>
Contributor
Author
End-to-End Test Results — Platform Hardening V411/11 tests passed. 0 escalations.
Key Verifications
Regression175 failures ≤ 194 baseline. 0 new test failures introduced. V4 suite: 33/33 pass. Fixes Applied During Testing8 issues fixed (82 insertions, 25 deletions):
Limitations
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements all ~50 platform audit recommendations identified post-PRs #28/#29 across KYC/KYB/liveness, stablecoins, flow of funds, and UI/UX. Full middleware integration with polyglot services (Go, Rust, Python) + TypeScript orchestration.
Core additions:
Temporal Cron Workflows (
server/middleware/temporalWorkflows.ts)continuousKYCWorkflow— 15-min re-screening against Refinitiv/ComplyAdvantage/ChainalysisyieldAutoCompoundWorkflow— daily harvest + reinvest from Aave V3/Compound V3dcaSchedulerWorkflow— per-user dollar-cost averaging with CoinGecko FX (fail-closed in prod)settlementNettingWorkflow— hourly bilateral netting with TigerBeetle settlementproofOfReservesWorkflow— daily attestation generationKafka Consumers (
server/middleware/kafkaConsumers.ts)auto-convert-consumeronPAYMENT_COMPLETEDtopic → triggers stablecoin conversiondlq-processorwith exponential backoff (max 7 retries) + PagerDuty escalationPolyglot Services
services/go-multi-rail-failover/main.go): SWIFT→RTGS→stablecoin→mobile money failover with circuit breakers per rail, PostgreSQL state persistenceservices/python-document-fraud/main.py): ONNX model inference for document authenticity classificationservices/python-synthetic-identity/main.py): Graph neural network for synthetic identity detectionservices/rust-audit-chain/src/main.rs): Tamper-proof SHA-256 hash-chained audit log with PostgreSQL persistencetRPC Router (
server/_core/platformV4Router.ts)Wires all
platformHardeningV4.tsfunctions into 4 sub-routers:kycV4,stablecoinV4,fundFlowV4,middlewareV4— with full Zod input validation matching the underlying type contracts.UI/UX — PWA/Mobile Parity
DeepLinksConfig— Universal Links (iOS) + App Links (Android) + PWA URL handlerNativePayments— Apple Pay + Google Pay via Stripe with platform detectionOptimizedImage— Cloudinary/imgix CDN with WebP/AVIF auto-format + responsive srcSetSkeletonLoaders— shimmer placeholders for all list/card/dashboard screenserrorTracking— Sentry SDK with breadcrumbs, session replay, performance tracingabTesting— GrowthBook SDK for frontend experimentationservice-worker-v4— stale-while-revalidate for API, cache-first for assets, LRU eviction, background sync queueMiddleware Wiring
Fluvio SmartModules (4: sanctions, PEP, threshold, adverse-media), OpenSearch ISM (hot→warm→cold→delete), Lakehouse ETL (bronze/silver/gold), APISix route sync, TigerBeetle reconciliation — all accessible via
middlewareV4router.Verification:
tsc --noEmit= 0 errors. Vitest = 193 failures (base branch has 194 — 0 new regressions introduced).Link to Devin session: https://app.devin.ai/sessions/64d054ae77da41e9a2b74d8593fa635c
Requested by: @munisp